A storage system typically comprises one or more storage devices into which information may be entered, and from which information may be obtained, as desired. The storage system includes a storage operating system that functionally organizes the system by, inter alia, invoking storage operations in support of a storage service implemented by the system. The storage system may be implemented in accordance with a variety of storage architectures including, but not limited to, a network-attached storage (NAS) environment, a storage area network (SAN) and a disk assembly directly attached to a client or host computer. The storage devices are typically disk drives organized as a disk array, wherein the term “disk” commonly describes a self-contained rotating magnetic media storage device. The term disk in this context is synonymous with hard disk drive (HDD) or direct access storage device (DASD).
Storage of information on the disk array is preferably implemented as one or more storage “volumes” of physical disks, defining an overall logical arrangement of disk space. The disks within a volume are typically organized as one or more groups, wherein each group may be operated as a Redundant Array of Independent (or Inexpensive) Disks (RAID). Most RAID implementations enhance the reliability/integrity of data storage through the redundant writing of data “stripes” across a given number of physical disks in the RAID group, and the appropriate storing of redundant information (parity) with respect to the striped data. The physical disks of each RAID group may include disks configured to store striped data (i.e., data disks) and disks configured to store parity for the data (i.e., parity disks). The parity may thereafter be retrieved to enable recovery of data lost when a disk fails. The term “RAID” and its various implementations are well-known and disclosed in A Case for Redundant Arrays of Inexpensive Disks (RAID), by D. A. Patterson, G. A. Gibson and R. H. Katz, Proceedings of the International Conference on Management of Data (SIGMOD), June 1988.
The storage operating system of the storage system may implement a high-level module, such as a file system, to logically organize the information stored on the disks as a hierarchical structure of directories, files and blocks. For example, each “on-disk” file may be implemented as set of data structures, i.e., disk blocks, configured to store information, such as the actual data for the file. These data blocks are organized within a volume block number (vbn) space that is maintained by the file system. The file system organizes the data blocks within the vbn space as a “logical volume”; each logical volume may be, although is not necessarily, associated with its own file system. The file system typically consists of a contiguous range of vbns from zero to n, for a file system of size n+1 blocks.
A known type of file system is a write-anywhere file system that does not over-write data on disks. If a data block is retrieved (read) from disk into a memory of the storage system and “dirtied” (i.e., updated or modified) with new data, the data block is thereafter stored (written) to a new location on disk to optimize write performance. A write-anywhere file system may initially assume an optimal layout such that the data is substantially contiguously arranged on disks. The optimal disk layout results in efficient access operations, particularly for sequential read operations, directed to the disks. An example of a write-anywhere file system that is configured to operate on a storage system is the Write Anywhere File Layout (WAFL®) file system available from Network Appliance, Inc., of Sunnyvale, Calif.
The storage system may be configured to operate according to a client/server model of information delivery to thereby allow many clients to access the directories, files and blocks stored on the system. In this model, the client may comprise an application, such as a database application, executing on a computer that “connects” to the storage system over a computer network, such as a point-to-point link, shared local area network, wide area network or virtual private network implemented over a public network, such as the Internet. Each client may request the services of the file system by issuing file system protocol messages (in the form of packets) to the storage system over the network. By supporting a plurality of file system protocols, such as the conventional Common Internet File System (CIFS) and the Network File System (NFS) protocols, the utility of the storage system is enhanced.
Each data container, such as a file, directory, etc., within a file system is typically associated with an inode that serves as the root of a buffer tree of the data container. The buffer tree is an internal representation of blocks for the data container stored in the memory of the storage system and maintained by the file system. The inode is a data structure used to store information, such as metadata, about the data container, whereas the data blocks are structures used to store the actual data for the container. The inode typically contains a set of pointers to other blocks within the file system. For data containers, such as files, that are sufficiently small, the inode may directly point to blocks storing the data of the file. However, for larger files, the inode points to one or more levels of indirect blocks, which, in turn, may point to additional levels of indirect blocks and/or the blocks containing the data.
Certain events occurring within the storage system and/or a storage operating system executing thereon may result in a message being displayed to an administrator. For example, the storage system may detect that one or more data containers have become corrupted. A pathname provides a way for the administrator to refer to a data container served by the storage system. To that end, each pathname typically represents one data container within the hierarchical structure of the file system. However, the storage system typically reports the identity of the data container to the administrator by using its associated inode number. The inode number is used internally within the file system to identify the inode associated with the data container and, unfortunately, is not easily understood by humans. It is therefore desirous for the administrator to know the pathname of the data container to which the message relates so that appropriate action may be taken.
A “brute force” technique to identify the pathname of a data container associated with a specific inode number is for an administrator to utilize a client, such as a network file system (NFS) client, to traverse (“walk”) the buffer trees of the file system and access (“open”) every data container within the file system. Upon opening a data container, the inode number associated with the data container is returned to the client. Thus, the client may have to walk the entire file system until an open data container operation returns the same inode number as that identified by the message. Such a brute force approach is extremely computationally, disk and network intensive and, as a file system may contain tens or hundreds of millions of data containers, time intensive. Additionally, the NFS client may not be able to access every data container due to, e.g., access controls, while certain data containers may not be NFS accessible, such as virtual disks (vdisks).
Another limitation is that multiple names in the file system may reference the same inode. For example, a data container, such as a file, is created in the file system in a particular directory and associated with a specific name. At some later point in time a hard link is generated that references the previously generated file, which results in a separate name being associated with the inode. A system administrator may want to know all of the names associated with an inode. Thus, a technique is needed that enables inode to pathname (I2P) mapping to thereby allow rapid identification of all names associated with a particular inode.
Certain storage system vendors have implemented various forms of I2P mapping functionality. For example, the Novell NetWare system stores character strings of all of the names associated with an inode within the inode itself. However, inodes are typically fixed sized data structures and if a sufficient number of names are associated with an inode, additional “spill over” inodes must be allocated for the data container. Such a solution increases the complexity of managing data and utilizes extra and valuable inode numbers, which may be limited within the file system.
Alternately, the Solaris operating system, available from Sun Microsystems, Inc., stores a pathname in the in-memory vnode data structure. However, modifications to the names of any directories in the pathname are not updated in the cached path within the vnode. Should a directory be renamed, the cached pathname data within the vnode data structure is not updated, which can result in incorrect pathnames being presented to an administrator. Another noted disadvantage is that no pathname information is stored persistently.